package mapper;

import entity.Business;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

public interface BusinessMapper {

    // 业务录入
    @Insert("INSERT INTO Business(customer_id, type, content, create_time) " +
            "VALUES(#{customerId}, #{type}, #{content}, NOW())")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    int insertBusiness(Business business);

    //业务修改
    int updateBusiness(Business business);

    //业务删除
    @Delete("DELETE FROM business WHERE id = #{id}")
    int deleteBusiness(int id);

    //业务查询
    @Select("SELECT * FROM business WHERE id = #{id}")
    Business selectBusiness(Long id);


    //业务信息的导入导出
void exportBusiness(List<Business> business);
    void importBusiness(List<Business> business);



}